package com.woniu.rabbit.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @TableName zy_order
 */
@TableName(value ="zy_order")
public class ZyOrder implements Serializable {
    /**
     * 订单编号
     */
    @TableId
    private String id;

    /**
     * 客户id
     */
    private String customId;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 商品总价
     */
    private BigDecimal totalPrice;

    /**
     * 运费
     */
    private BigDecimal shippingFee;

    /**
     * 优惠金额
     */
    private BigDecimal discountAmount;

    /**
     * 实付款
     */
    private BigDecimal actualAmount;

    /**
     * 生效时间
     */
    private Date createTime;

    /**
     * 失效时间
     */
    private Date shixiaoTime;

    /**
     * 生效方式
     */
    private String shengxiaoWay;

    /**
     * 状态：0-办理中；1-办理完成；2-配送中3-已删除
     */
    private Integer state;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 订单编号
     */
    public String getId() {
        return id;
    }

    /**
     * 订单编号
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 客户id
     */
    public String getCustomId() {
        return customId;
    }

    /**
     * 客户id
     */
    public void setCustomId(String customId) {
        this.customId = customId;
    }

    /**
     * 用户id
     */
    public String getUserId() {
        return userId;
    }

    /**
     * 用户id
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }

    /**
     * 商品总价
     */
    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    /**
     * 商品总价
     */
    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    /**
     * 运费
     */
    public BigDecimal getShippingFee() {
        return shippingFee;
    }

    /**
     * 运费
     */
    public void setShippingFee(BigDecimal shippingFee) {
        this.shippingFee = shippingFee;
    }

    /**
     * 优惠金额
     */
    public BigDecimal getDiscountAmount() {
        return discountAmount;
    }

    /**
     * 优惠金额
     */
    public void setDiscountAmount(BigDecimal discountAmount) {
        this.discountAmount = discountAmount;
    }

    /**
     * 实付款
     */
    public BigDecimal getActualAmount() {
        return actualAmount;
    }

    /**
     * 实付款
     */
    public void setActualAmount(BigDecimal actualAmount) {
        this.actualAmount = actualAmount;
    }

    /**
     * 生效时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 生效时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 失效时间
     */
    public Date getShixiaoTime() {
        return shixiaoTime;
    }

    /**
     * 失效时间
     */
    public void setShixiaoTime(Date shixiaoTime) {
        this.shixiaoTime = shixiaoTime;
    }

    /**
     * 生效方式
     */
    public String getShengxiaoWay() {
        return shengxiaoWay;
    }

    /**
     * 生效方式
     */
    public void setShengxiaoWay(String shengxiaoWay) {
        this.shengxiaoWay = shengxiaoWay;
    }

    /**
     * 状态：0-办理中；1-办理完成；2-配送中3-已删除
     */
    public Integer getState() {
        return state;
    }

    /**
     * 状态：0-办理中；1-办理完成；2-配送中3-已删除
     */
    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ZyOrder other = (ZyOrder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCustomId() == null ? other.getCustomId() == null : this.getCustomId().equals(other.getCustomId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
            && (this.getShippingFee() == null ? other.getShippingFee() == null : this.getShippingFee().equals(other.getShippingFee()))
            && (this.getDiscountAmount() == null ? other.getDiscountAmount() == null : this.getDiscountAmount().equals(other.getDiscountAmount()))
            && (this.getActualAmount() == null ? other.getActualAmount() == null : this.getActualAmount().equals(other.getActualAmount()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getShixiaoTime() == null ? other.getShixiaoTime() == null : this.getShixiaoTime().equals(other.getShixiaoTime()))
            && (this.getShengxiaoWay() == null ? other.getShengxiaoWay() == null : this.getShengxiaoWay().equals(other.getShengxiaoWay()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCustomId() == null) ? 0 : getCustomId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
        result = prime * result + ((getShippingFee() == null) ? 0 : getShippingFee().hashCode());
        result = prime * result + ((getDiscountAmount() == null) ? 0 : getDiscountAmount().hashCode());
        result = prime * result + ((getActualAmount() == null) ? 0 : getActualAmount().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getShixiaoTime() == null) ? 0 : getShixiaoTime().hashCode());
        result = prime * result + ((getShengxiaoWay() == null) ? 0 : getShengxiaoWay().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", customId=").append(customId);
        sb.append(", userId=").append(userId);
        sb.append(", totalPrice=").append(totalPrice);
        sb.append(", shippingFee=").append(shippingFee);
        sb.append(", discountAmount=").append(discountAmount);
        sb.append(", actualAmount=").append(actualAmount);
        sb.append(", createTime=").append(createTime);
        sb.append(", shixiaoTime=").append(shixiaoTime);
        sb.append(", shengxiaoWay=").append(shengxiaoWay);
        sb.append(", state=").append(state);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}